package com.longxi.tianjintianbao.ui.dialog_fragment;

import android.widget.EditText;
import android.widget.TextView;

import com.longxi.tianjintianbao.R;
import com.longxi.tianjintianbao.ui.activity.task.TaskDetailActivity;
import com.longxi.tianjintianbao.ui.base.BaseDialogFragment;
import com.longxi.tianjintianbao.ui.presenter.task.TaskProgressDfgPresenter;
import com.longxi.tianjintianbao.ui.view.task.ITaskProgressDfgView;

import butterknife.BindView;

public class TaskProgressDialogFragment extends BaseDialogFragment<ITaskProgressDfgView, TaskProgressDfgPresenter> implements ITaskProgressDfgView {

    @BindView(R.id.etContent)
    EditText mEtContent;
    @BindView(R.id.btnLogin)
    TextView mBtnLogin;

    @Override
    public void initData() {
        super.initData();
        mPresenter.setBar();
    }

    @Override
    public void initListener() {
        super.initListener();
        mBtnLogin.setOnClickListener(v -> mPresenter.acceptTask());
    }

    @Override
    protected int provideContentViewId() {
        return R.layout.dialog_fragment_task_explain;
    }

    @Override
    protected TaskProgressDfgPresenter createPresenter() {
        return new TaskProgressDfgPresenter((TaskDetailActivity)getActivity(), this);
    }

    @Override
    public EditText getEtContent() {
        return mEtContent;
    }

    @Override
    public TextView getBtnLogin() {
        return mBtnLogin;
    }
}
